i am trying to create a windows directory and a text file under the new directory. if the directory already exists, i just want to create the file. I am getting an access error "can not open the folder". |
Re: How to create a windows directory
Dude ... reposting will not help you to get quicker anwers! NOT: filename= "C:\temp\..." BUT: filename= "C:\\temp\\..."
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS
|
Re: How to create a windows directory Didn't try to run it, but perhaps the following:
Stream outF
string dirname="c\\temp\\foldername" //** ESCAPE slashes
string filename="test.txt"
if(!fileExists(dirname)) // **fileExists. Don't need period
{
mkdir(dirname, "") // how to give access to everyone??????
outF=write(dirname "\\" filename) // ** separate file name from folder
}
else
{
outF=write(dirname "\\" filename) //** ditto
}
|